<html>
<body>
	<input type="file" name="file" id="sys_file_upload" multiple class="file-loading"
		accept=".jpg,.png,.gif,.xls,.xlsx,.doc,.docx,.pdf,.zip,.bmp,.txt,.ppt" />
	<script type="text/javascript">
		$(function(){
			$('#sys_file_upload').fileinput({
			    language: 'zh',
			    uploadUrl: '${url}',
			    allowedFileExtensions: ['jpg', 'png', 'gif','xls','xlsx','doc','docx','pdf','zip','bmp','txt','ppt'],
			    showUpload: false, //是否显示上传按钮
		        showCaption: true,//是否显示标题
			    showRemove: false, //是否显示移除按钮
			    showClose: true,
			    enctype: 'multipart/form-data',
			    minFileCount: 1,
			    layoutTemplates :{
		            // actionDelete:'', //去除上传预览的缩略图中的删除图标
					// actionZoom:'',   //去除上传预览缩略图中的查看详情预览的缩略图标
		            actionUpload:''//去除上传预览缩略图中的上传图片
		        },
		        preferIconicPreview: true, //开启用图标替换预览效果
		        previewFileIconSettings: { //配置样式图标
			       'doc': '<i class="fa fa-file-word-o text-primary"></i>',
			       'xls': '<i class="fa fa-file-excel-o text-success"></i>',
			       'ppt': '<i class="fa fa-file-powerpoint-o text-danger"></i>',
			       'pdf': '<i class="fa fa-file-pdf-o text-danger"></i>',
			       'txt': '<i class="fa fa-file-text-o text-info"></i>',
			       'zip': '<i class="fa fa-file-archive-o text-muted"></i>',
			       'htm': '<i class="fa fa-file-code-o text-info"></i>',
			       'mov': '<i class="fa fa-file-movie-o text-warning"></i>',
			       'mp3': '<i class="fa fa-file-audio-o text-warning"></i>'
			    },
				previewFileExtSettings: {
			       'doc': function(ext) {
			           return ext.match(/(doc|docx)$/i);
			       },
			       'xls': function(ext) {
			           return ext.match(/(xls|xlsx)$/i);
			       },
			       'ppt': function(ext) {
			           return ext.match(/(ppt|pptx)$/i);
			       },
			       'zip': function(ext) {
			           return ext.match(/(zip|rar|tar|gzip|gz|7z)$/i);
			       },
			       'htm': function(ext) {
			           return ext.match(/(htm|html)$/i);
			       },
			       'mov': function(ext) {
			           return ext.match(/(avi|mpg|mkv|mov|mp4|3gp|webm|wmv)$/i);
			       },
			       'mp3': function(ext) {
			           return ext.match(/(mp3|wav)$/i);
			       },
			       'txt': function(ext) {
			           return ext.match(/(txt|ini|csv|java|php|js|css)$/i);
			       }
				},   
			    maxFileCount: 3, //表示允许同时上传的最大文件个数
			    browseClass: 'btn btn-primary'
			});
		    
		});
	</script>
</body>
</html>